package com.administration.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.core.entity.BaseEntity;

/**
 * 
 * @author KarimSherif
 */
@Entity
@Table(name = "user")
public class User extends BaseEntity {
	private static final long serialVersionUID = -321851703717220895L;

	@Id
	@Column(name = "recid", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long recid;

	@Column(name = "user_name", length = 20)
	private String userName;

	@Column(name = "password ", length = 20)
	private String password;

	@Column(name = "first_name", length = 50)
	private String firstName;

	@Column(name = "second_name", length = 50)
	private String secondName;

	@Column(name = "email", length = 50)
	private String email;

	@Column(name = "mobile", length = 50)
	private String mobile;

	@Column(name = "group_id")
	private Long groupId;

	// ------------------------------

	public User() {
	}

	// \\############################################################################################################################
	public User(String userName, String password, Long userId, Long groupId,
			String firstName, String secondName, String email, String mobile) {
		this.userName = userName;
		this.password = password;
		this.recid = userId;
		this.groupId = groupId;
		this.firstName = firstName;
		this.secondName = secondName;
		this.email = email;
		this.mobile = mobile;
	}

	@Override
	public String toString() {
		return "User{" + " userId=" + recid + " ,,userName=" + userName
				+ " ,password=" + password + " ,firstName=" + firstName
				+ " ,secondName=" + secondName + " ,email=" + email
				+ " ,mobile=" + mobile + " ,groupId=" + groupId + '}';
	}

	// \\############################################################################################################################
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSecondName() {
		return secondName;
	}

	public void setSecondName(String secondName) {
		this.secondName = secondName;
	}

	public Long getUserId() {
		return recid;
	}

	public void setUserId(Long userId) {
		this.recid = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Long getGroupId() {
		return groupId;
	}

	public void setGroupId(Long groupId) {
		this.groupId = groupId;
	}

	@Override
	public Long getRecid() {
		return recid;
	}
}
